/***************************************************************************
 *   Copyright (C) 2007 by Mohammad Keikanloo   *
 *   rm1232002@gmail.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#include "UI.h"
#include <iostream>

using namespace std;

//UI ui;

void UI::start()
{
	char choice,temp;
	cout << "Welcome to your poll form!" << endl;
	cout << "This program is under GNU General Public License" << endl;
	cout << "------------------------------------------------------------------------------" << endl;
	cout << "You can:" << endl;
	cout << "1-Setup your form." << endl;
	cout << "2-Creat or Edit your database." << endl;
	cout << "3-See the report of your database." << endl;
	cout << "4-Exit." << endl;
	cout << "Now enter the number of your choice:";
	cin  >> choice;
	switch (choice)
	{
		case '1':
			ui.setup();
			break;
		case '2':
			ui.dataunit();
			break;
		case '3':
			ui.report();
			break;
		case '4':
			ui.exit();
			break;
		default:
			cout << "Please enter a valid choice number!!!" << endl;
			cin.get(temp); //empty the buffer.
			cin.get(temp); //wait for read the message.
			system("clear");
			ui.exit();
			
}
	
}

void UI::setup()
{
}

void UI::dataunit()
{
}

void UI::report()
{
}

void UI::exit()
{
}


